package com.tcoiss.kettle.server.controller;

import com.tcoiss.kettle.server.service.TransMonitorService;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/count")
public class CountController {
    private final TransMonitorService transMonitorService;

    public CountController(TransMonitorService transMonitorService) {
        this.transMonitorService = transMonitorService;
    }
//    @PostMapping("/sum.do")
//    public CountSumRes count(@RequestBody QueryHelper<CountSumReq> countSumReq){
//        return transMonitorService.count(countSumReq.getQuery(),countSumReq.getPage().getPageable());
//    }
    @GetMapping("/getLastSevenDaysNum.do")
    public List<Map> getLastSevenDaysNum() {
        return transMonitorService.getLastSevenDaysNum();
    }

    @GetMapping ("/getTodayNum.do")
    public Map getTodayNum() {
        return transMonitorService.getTodayNum();
    }

    @GetMapping ("/getSystemDisk.do")
    public Map getSystemDisk() {
        return transMonitorService.getSystemDisk();
    }

    @GetMapping ("/getDataBySystem.do")
    public List<Map> getDataBySystem() {
        return transMonitorService.getDataBySystem();
    }
}
